using System;

namespace Voodoo.Sauce.Internal.SDKs
{
	[Serializable]
	public class AdNetworkSDK
	{
		public string name;

		public string icon;

		public AdNetworkPlatform ios;

		public AdNetworkPlatform android;

		public string[] GetVersionsAsArray()
		{
			return new string[4]
			{
				ios.version,
				ios.adapter.version,
				android.version,
				android.adapter.version
			};
		}

		public override bool Equals(object obj)
		{
			if (obj == null || GetType() != obj.GetType())
			{
				return false;
			}
			AdNetworkSDK adNetworkSDK = (AdNetworkSDK)obj;
			if ((name ?? "") != (adNetworkSDK.name ?? "") || (icon ?? "") != (adNetworkSDK.icon ?? "") || ((ios == null || ios.IsEmpty()) && adNetworkSDK.ios != null && !adNetworkSDK.ios.IsEmpty()) || (ios != null && !ios.Equals(adNetworkSDK.ios)) || ((android == null || android.IsEmpty()) && adNetworkSDK.android != null && !adNetworkSDK.android.IsEmpty()) || (android != null && !android.Equals(adNetworkSDK.android)))
			{
				return false;
			}
			return true;
		}

		public override int GetHashCode()
		{
			return (((((((name != null) ? name.GetHashCode() : 0) * 397) ^ ((icon != null) ? icon.GetHashCode() : 0)) * 397) ^ ((ios != null) ? ios.GetHashCode() : 0)) * 397) ^ ((android != null) ? android.GetHashCode() : 0);
		}

		public bool IsEmpty()
		{
			if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(icon) && (ios == null || ios.IsEmpty()) && (android == null || android.IsEmpty()))
			{
				return true;
			}
			return false;
		}
	}
}
